MoEAnalyticsHelper

Helper class to track data on the MoEngage Platform.

Since

12.0.00

Author

Umang Chamaria

Functions

Link copied to clipboard
fun setAlias(context: Context, alias: Any)
fun setAlias(context: Context, alias: Any, appId: String)

Set an Alias to update the existing Unique Id Note: This API only accepts the below data-types:

Link copied to clipboard
fun setAppStatus(context: Context, status: AppStatus)
fun setAppStatus(context: Context, status: AppStatus, appId: String)

This API tells the SDK whether it is a fresh install or an existing application was updated.

Link copied to clipboard
fun setBirthDate(context: Context, birthDate: Date)

Helper method to set User's Birth Date.

fun setBirthDate(context: Context, isoDate: String)
fun setBirthDate(context: Context, isoDate: String, appId: String)

Helper method to set user's Birth Date. Supported format - yyyy-MM-dd|yyyyMMdd[T(hh:mm[:ss.sss]|hhmm[ss.sss])]?[Z|+-hh:mm]]

fun setBirthDate(context: Context, birthDate: Date, appId: String)

Helper method to set User BirthDate

Link copied to clipboard
fun setEmailId(context: Context, value: String)
fun setEmailId(context: Context, value: String, appId: String)

Helper method to set user email

Link copied to clipboard
fun setFirstName(context: Context, value: String)
fun setFirstName(context: Context, value: String, appId: String)

Helper method to set User first Name

Link copied to clipboard
fun setGender(context: Context, gender: UserGender)
fun setGender(context: Context, gender: UserGender, appId: String)

Helper method to set user gender

Link copied to clipboard
fun setLastName(context: Context, value: String)
fun setLastName(context: Context, value: String, appId: String)

Helper method to set User Last Name

Link copied to clipboard
fun setLocation(context: Context, lat: Double, lng: Double)
fun setLocation(context: Context, lat: Double, lng: Double, appId: String)

Track user location as a User Attribute

Link copied to clipboard
fun setMobileNumber(context: Context, value: String)
fun setMobileNumber(context: Context, value: String, appId: String)

Helper method to set User Number

Link copied to clipboard
fun setUniqueId(context: Context, uniqueId: Any)
fun setUniqueId(context: Context, uniqueId: Any, appId: String)

Set an Unique Identifier for the user.

Link copied to clipboard
fun setUserAttribute(context: Context, attributes: Map<String, Any>)
fun setUserAttribute(context: Context, attributes: Map<String, Any>, appId: String)

Set the user attributes with the attributes specified in the HashMap

fun setUserAttribute(context: Context, attributeName: String, attributeValue: Any)

Track a user attribute in the default instance.

fun setUserAttribute(context: Context, name: String, value: Any, appId: String)

Track a user attribute in the given account.

Link copied to clipboard
fun setUserAttributeEpochTime(context: Context, name: String, value: Long)
fun setUserAttributeEpochTime(context: Context, name: String, value: Long, appId: String)

Sets the given epoch time for the given user.

Link copied to clipboard
fun setUserAttributeISODate(context: Context, attributeName: String, attributeValue: String)
fun setUserAttributeISODate(context: Context, attributeName: String, attributeValue: String, appId: String)

Set a date type user attribute for the current user.

Link copied to clipboard
fun setUserName(context: Context, value: String)
fun setUserName(context: Context, value: String, appId: String)

Helper method to set user full name

Link copied to clipboard
fun trackDeviceLocale(context: Context, appId: String)

Tracks device locale.

Link copied to clipboard
fun trackEvent(context: Context, eventName: String, properties: Properties)
fun trackEvent(context: Context, eventName: String, properties: Properties, appId: String)

Track user behaviour as events with properties.

Link copied to clipboard
fun trackUserPushPreference(context: Context, pushPreference: Boolean)
fun trackUserPushPreference(context: Context, pushPreference: Boolean, appId: String)

Set user's push preference.